home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / tbav503.zip / TBCLEAN.DOC < prev    next >
Text File  |  1992-12-29  |  35KB  |  1,021 lines

  1.  
  2.  
  3.  Thunderbyte clean utility. (C) Copyright 1989-1992 Thunderbyte B.V.
  4.  
  5.  
  6.                                Table of Contents
  7.  
  8.  
  9.     1. INTRODUCTION...................................... 2
  10.         1.1. Purpose of TbClean.......................... 2
  11.         1.2. A quick start............................... 2
  12.         1.3. What is cleaning?........................... 2
  13.         1.4. Conventional cleaners....................... 3
  14.         1.5. Generic cleaner............................. 4
  15.             1.5.1. Repair cleaner........................ 4
  16.             1.5.2. Heuristic cleaner..................... 4
  17.         1.6. Benefits.................................... 4
  18.             1.6.1. Reliability........................... 5
  19.             1.6.2. Removal of polymorphic viruses........ 5
  20.             1.6.3. Removal of encrypting viruses......... 5
  21.             1.6.4. No updates required................... 5
  22.         1.7. How many viruses can it remove.............. 5
  23.  
  24.     2. USAGE OF THE PROGRAM.............................. 6
  25.         2.1. System requirements......................... 6
  26.         2.2. Program invocation.......................... 6
  27.         2.3. While cleaning.............................. 6
  28.         2.4. The messages................................ 7
  29.         2.5. The result................................. 10
  30.         2.6. Command line options....................... 11
  31.             2.6.1. help ................................ 11
  32.             2.6.2. pause ............................... 11
  33.             2.6.3. mono ................................ 11
  34.             2.6.4. noav ................................ 12
  35.             2.6.5. noems ............................... 12
  36.             2.6.6. showloop ............................ 12
  37.             2.6.7. list ................................ 12
  38.         2.7. Cleaning multiple files.................... 12
  39.         2.8. Examples:.................................. 13
  40.  
  41.     3. CONSIDERATIONS AND RECOMMENDATIONS............... 14
  42.         3.1. Why cleaning?.............................. 14
  43.         3.2. After cleaning............................. 14
  44.         3.3. Cleaning limitations....................... 15
  45.         3.4. Safety of TbClean.......................... 15
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.                                      Page i
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.                                      Page 1
  122.  
  123.  Thunderbyte clean utility. (C) Copyright 1989-1992 Thunderbyte B.V.
  124.  
  125.  
  126. 1.  INTRODUCTION
  127.  
  128.  
  129.   1.1.  Purpose of TbClean
  130.  
  131.     TbClean is a program that separates a virus from an infected
  132.     program.  After this separation, the program can be used as
  133.     before, without any risk of infecting or damaging other files.
  134.  
  135.  
  136.   1.2.  A quick start
  137.  
  138.     Although we highly recommend a complete reading of this manual,
  139.     here are some directions for a quick run of TbClean:
  140.  
  141.     Type 'TbClean <filename>' at the DOS prompt to clean the program
  142.     with name <filename>. So, if the program to be cleaned is named
  143.     TEST.EXE you should type:
  144.  
  145.         TBCLEAN TEST.EXE
  146.  
  147.     The invocation syntax is:
  148.  
  149.         TBCLEAN [<path>]<filename> [<options>]...
  150.  
  151.     For fast online help, type 'TbClean ?' or 'TbClean help'. The latter
  152.     will provide a more detailed description of the command line options.
  153.  
  154.  
  155.   1.3.  What is cleaning?
  156.  
  157.     Before we can answer this question, we have to know how a virus
  158.     infects a program. The basic principle is not difficult. A virus -
  159.     a program by itself - adds itself to the end of the program. The
  160.     size of the program increases due to this addition of the viral
  161.     code. Appending a virus program to another program is however not
  162.     enough, the virus code should also be executed. To make this
  163.     happen, the virus overwrites the first bytes of the file with a
  164.     'jump' instruction, that makes the processor jump to the viral
  165.     code. The virus now gains control when the program is invoked, and
  166.     it will finally pass control to the original program.  Since the
  167.     first bytes of the file are overwritten by the jump instruction the
  168.     virus has to 'repair' these bytes first. After that the virus just
  169.     jumps to the beginning of the original program, and most often this
  170.     program works as usual.
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.                                      Page 2
  182.  
  183.  Thunderbyte clean utility. (C) Copyright 1989-1992 Thunderbyte B.V.
  184.  
  185.  
  186.     original program                      infected program
  187.  
  188.     +--------------+                      +--------------+
  189.     | p            |                 100: |jump          |
  190.     | r            |                      |to 2487       |
  191.     | o            |                      | o            |
  192.     | g            |                      | g            |
  193.     | r            |                      | r            |
  194.     | a            |                      | a            |
  195.     | m            |                      | m            |
  196.     |              |                      |              |
  197.     | c            |                      | c            |
  198.     | o            |                      | o            |
  199.     | d            |                      | d            |
  200.     | e            |                      | e            |
  201.     |              |                      |              |
  202.     +--------------+                      +--------------+
  203.                                     2487: |              |
  204.                                           |  VIRUS!    p |
  205.                                           |            r |
  206.                                           |jmp 100       |
  207.                                           +--------------+
  208.  
  209.     To clean an infected program, it is of vital importance to restore
  210.     the bytes being overwritten by the jump to the virus code. The
  211.     virus has to restore these bytes also, so somewhere in this virus
  212.     code these original bytes are stored. The cleaner searches those
  213.     bytes, puts them back on their original location, and truncates the
  214.     file to the original size.
  215.  
  216.  
  217.   1.4.  Conventional cleaners
  218.  
  219.     A conventional cleaner has to know which virus to remove. Suppose
  220.     your system is infected with a Jerusalem/PLO virus. You invoke your
  221.     cleaner and it proceeds like this:
  222.  
  223.     "Hey, this file is infected with the Jerusalem/PLO virus. Ok, this
  224.     virus is 1873 bytes in size, and it overwrites the first three
  225.     bytes of the original program with a jump to itself. The original
  226.     bytes are located at offset 483 in the viral code. So, I have to
  227.     take those bytes, copy them to the beginning of the file, and I
  228.     have to remove 1873 bytes of the file. That's it!"
  229.  
  230.     Pitfalls!
  231.  
  232.     The cleaner has to know the virus it has to remove. It is
  233.     impossible to remove an unknown virus.
  234.  
  235.     The virus should be the same as the virus known to the cleaner.
  236.     Imagine what whould happen if the virus used in the example was
  237.     modified and now 1869 bytes in size instead of 1873... The cleaner
  238.  
  239.  
  240.  
  241.                                      Page 3
  242.  
  243.  Thunderbyte clean utility. (C) Copyright 1989-1992 Thunderbyte B.V.
  244.  
  245.  
  246.     would remove too much! This is not an exception, but it happens
  247.     quite often since there are so many mutants. For instance, the
  248.     Jerusalem/PLO family now contains more than 30 mutants!
  249.  
  250.  
  251.   1.5.  Generic cleaner
  252.  
  253.     TbClean works completely different. First of all, it does not
  254.     recognize any virus! It's disinfection scheme is completely
  255.     different and it works with almost any virus. Actually, the TbClean
  256.     program contains two cleaners: a 'repair' cleaner, and a
  257.     'heuristic' cleaner.
  258.  
  259.     1.5.1.  Repair cleaner
  260.  
  261.         This type of cleaning needs the file Anti-Vir.Dat generated by
  262.         TbSetup before the infection occured. In this Anti-Vir.Dat file
  263.         a lot of information is stored, like the original file size,
  264.         the bytes at the beginning of the program, a cryptographic
  265.         checksum to verify the results, etc. This information is enough
  266.         to disinfect almost every file, regardless of the virus it is
  267.         infected with, known or unknown.  The only things that the
  268.         cleaner should do is restore the bytes at the beginning of
  269.         the program, truncate the file to the original size, and verify
  270.         the result by using the checksum.
  271.  
  272.     1.5.2.  Heuristic cleaner
  273.  
  274.         TbClean is the first cleaner in the world that has a heuristic
  275.         cleaning mode. In the heuristic cleaning mode TbClean does not
  276.         need any information about viruses, nor does it need any
  277.         information about the program in its original state. This
  278.         cleaning mode is excellent if your system is infected with an
  279.         unknown virus and you haven't used TbSetup to generate the
  280.         Anti-Vir.Dat files in time.
  281.  
  282.         The basic principle of heuristic cleaning is simple. TbClean
  283.         loads the infected file and starts emulating the program code.
  284.         It uses a combination of disassembly, emulation and sometimes
  285.         execution to trace the flow of the virus, and to emulate what
  286.         the virus is normally doing. When the virus restored the
  287.         original instructions and jumps back to the original program
  288.         code, TbClean stops the emulation process, and says 'thank you'
  289.         to the virus for its cooperation in restoring the original
  290.         bytes.  The now repaired start of the program is copied back to
  291.         the program file on disk, and the part of the program that
  292.         gained 'execution' will be removed. An additional analysis of
  293.         the cleaned program file will be performed to be on the safe
  294.         side.
  295.  
  296.  
  297.   1.6.  Benefits
  298.  
  299.  
  300.  
  301.                                      Page 4
  302.  
  303.  Thunderbyte clean utility. (C) Copyright 1989-1992 Thunderbyte B.V.
  304.  
  305.  
  306.     By now many different virus cleaners/disinfectors have been
  307.     developed.  However, TbClean has a number of important and unique
  308.     advantages over other cleaners. These are:
  309.  
  310.     1.6.1.  Reliability
  311.  
  312.       The reliability of TbClean is excellent. The 'repair' mode of
  313.       TbClean makes it possible to verify the results based on a
  314.       cryptographic 32-bit CRC. If this checksum of the cleaned file
  315.       matches the checksum of the original file, it is almost certain
  316.       that the file is completely the same.
  317.  
  318.       The heuristic cleaning mode of TbClean is also highly reliable.
  319.       Due to the cleaning approach, there is no risk that TbClean
  320.       removes too much from an infected file, or that it restores the
  321.       wrong bytes. Both would irreversibly damage the file so that
  322.       subsequent cleaning attempts fail anyway, which happens quite
  323.       often with other cleaners.
  324.  
  325.     1.6.2.  Removal of polymorphic viruses
  326.  
  327.       TbClean removes 'difficult' viruses. Due to its approach, it
  328.       doesn't matter whether the virus is polymorphic and/or encrypts
  329.       itself. It removes a MTE or Washburn related virus with the same
  330.       ease as a Jerusalem virus! Try this with other cleaners!
  331.  
  332.     1.6.3.  Removal of encrypting viruses
  333.  
  334.       Some viruses encrypt the original program, making it nearly
  335.       impossible for other cleaners to restore it.  TbClean however
  336.       uses the virus itself to decrypt the original file, so for
  337.       TbClean is does not matter how the file is encrypted. Even MTE
  338.       encrypted programs can be restored.
  339.  
  340.     1.6.4.  No updates required
  341.  
  342.       Since TbClean does not need to know anything about the virus to
  343.       remove it, it has the same success rate when dealing with unknown
  344.       viruses as with known viruses. You do not need frequent updates
  345.       of the cleaning program.
  346.  
  347.  
  348.   1.7.  How many viruses can it remove
  349.  
  350.     This question is difficult to answer since TbClean does not contain
  351.     any information about a specific virus. If the Anti-Vir.Dat records
  352.     are available, TbClean cleans about 95% of the viruses. If heuristic
  353.     cleaning is the only option, still 80% of the viruses can be
  354.     removed. This is still more than many conventional cleaners achieve!
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.                                      Page 5
  362.  
  363.  Thunderbyte clean utility. (C) Copyright 1989-1992 Thunderbyte B.V.
  364.  
  365.  
  366. 2.  USAGE OF THE PROGRAM
  367.  
  368.  
  369.   2.1.  System requirements
  370.  
  371.     TbClean runs perfectly on standard machines, in line with our
  372.     philosophy that there should be a limit to limitations.
  373.  
  374.     +   TbClean requires at least 96 Kb of free memory. In the
  375.         heuristic cleaning mode TbClean needs a lot more, depending on
  376.         the size of the infected file. TbClean can also use expanded
  377.         memory (EMS).
  378.  
  379.     +   TbClean can be executed under DOS version 3.00 (and all later
  380.         versions). However, DOS 3.3 or higher is recommended, since
  381.         TbClean has been designed primarily for use with these DOS
  382.         versions.
  383.  
  384.  
  385.   2.2.  Program invocation
  386.  
  387.     TbClean is easy to use. The syntax is as follows:
  388.  
  389.             TBCLEAN [<path>]<filename> [<outputname>] [<options>]...
  390.  
  391.     If you specify only one filename TbClean will make a backup of the
  392.     program in a file with the same name but with the extension '.VIR'.
  393.     The program will then be disinfected. If you specify two filenames,
  394.     TbClean will not alter the first file, but the disinfected file
  395.     will get the name of the second filename specified.
  396.  
  397.  
  398.   2.3.  While cleaning
  399.  
  400.     The screen of TbClean will be similar to the screens of TbSetup and
  401.     TbScan. The lower window is used to display the disassembly and
  402.     register contents, the blue bar in the middle contains the name of
  403.     the program being cleaned, and directly above this bar you will
  404.     find the history window that displays useful information. The upper
  405.     part of this window will be defined in two status screens, one with
  406.     information of the infected file, the other with information of the
  407.     original file. If TbClean has found a suitable Anti-Vir.Dat file
  408.     the state of the original file is known and will be displayed, but
  409.     when TbClean uses heuristic cleaning it will dynamically generate
  410.     this information when the disassembly and emulation proceeds.
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.                                      Page 6
  422.  
  423.  Thunderbyte clean utility. (C) Copyright 1989-1992 Thunderbyte B.V.
  424.  
  425.  
  426.     ===
  427.     Thunderbyte clean util (C) 1992 Thunderbyte BV The Netherlands
  428.     +----------------------------+ +-----------------------------+
  429.     | Entry point      1234:5678 | | Entry point      0A34:0100  |
  430.     | File length         123456 | | File length          17856  |
  431.     | Cryptographic CRC 1234ABCD | | Cryptographic CRC ABCD1234  |
  432.     +----------------------------+ +-----------------------------+
  433.       Anti-Vir.Dat record not found, trying emulation           *
  434.       Disassembly terminated: program jumped back to entry point.
  435.     > Program has been successfully cleaned!               *    .
  436.     C:\VIRUS\VIRUS.EXE               * . . .               .    .
  437.      CS:IP    Instruction    AX  BX  CX  DX. DS  SI  ES  DI. BP .
  438.                                            .               .    .
  439.     0200:0100 jmp 0347                     .               .    .
  440.                                            .               .    .
  441.     0200:0347 inc ax                       .               .    .
  442.     0200:0348 inc bx                       .           *   .    .
  443.     0200:0349 mov cx,0ABCD                 .           .   .    .
  444.                                            .           .   .    .
  445.     ===                                    .           .   .    .
  446.                             Filename . . .             .   .    .
  447.                                  Emulation window . . .    .    .
  448.                                       History window  . . .     .
  449.                                            Status window . . . .
  450.  
  451.     It is not necessary to understand the information displayed in the
  452.     emulation window. It is just there for people who want to see what
  453.     is going on.
  454.  
  455.     The process can be aborted by pressing Ctrl-Break.
  456.  
  457.  
  458.   2.4.  The messages
  459.  
  460.     While cleaning, TbClean displays messages in the history window.
  461.     Most messages will be clear enough, but here is some additional
  462.     information about them.
  463.  
  464.     Starting clean attempt. Analyzing infected file...
  465.  
  466.         TbClean is analyzing the infected file and tries to locate the
  467.         Anti-Vir.Dat record.
  468.  
  469.     Anti-Vir.Dat record found: reconstructing original state...
  470.  
  471.         The Anti-Vir.Dat record that belongs to the infected file has
  472.         been found. The information will be used to reconstruct the
  473.         file.
  474.  
  475.     Anti-Vir.Dat record found: information matches the current state of
  476.     file. Anti-Vir.Dat file was created after the infecton. Trying
  477.     emulation...
  478.  
  479.  
  480.  
  481.                                      Page 7
  482.  
  483.  Thunderbyte clean utility. (C) Copyright 1989-1992 Thunderbyte B.V.
  484.  
  485.  
  486.         The Anti-Vir.Dat record has been found, but the information
  487.         matches the current state of the file. The Anti-Vir.Dat record
  488.         has been created after the file got infected, or the file is
  489.         not changed at all. TbClean is going to emulate the file to
  490.         clean it heuristically.
  491.  
  492.     Reconstruction failed. Program might be overwritten. Trying
  493.     emulation...
  494.  
  495.         TbClean tried to reconstruct the original file with help of the
  496.         information stored in the Anti-Vir.Dat record. However, the
  497.         attempt failed. TbClean is going to emulate the file to try to
  498.         clean it heuristically.
  499.  
  500.     Reconstruction successfully completed.
  501.  
  502.         The file has been reconstructed to its original state with help
  503.         of the information of the Anti-Vir.Dat record. The CRC
  504.         (checksum) of the original file and the cleaned file are
  505.         completely equal, so the cleaned file is almost certain equal
  506.         to the original file.
  507.  
  508.     Anti-Vir.Dat record not found: original state unknown. Trying
  509.     emulation...
  510.  
  511.         The Anti-Vir.Dat file did not exist or did not contain
  512.         information of the infected program, so the original state of
  513.         the infected program is unknown to TbClean. TbClean will switch
  514.         to its heuristic mode to determine the state of the original
  515.         file.
  516.  
  517.         Note: to prevent a situation like this, make sure to use the
  518.         TbSetup program to generate the Anti-Vir.Dat records. These
  519.         records are of great help to TbClean. When the file is already
  520.         infected it is too late to generate the Anti-Vir.Dat records.
  521.  
  522.     Emulation terminated: <reason>
  523.  
  524.         The emulation process has been terminated for the reason
  525.         specified. TbClean will now consult the collected information
  526.         to see if it can disinfect the file.
  527.  
  528.         <reason> can be one of the following:
  529.  
  530.         Jump to BIOS code.
  531.  
  532.                 The virus tried to perform a call or jump directly to
  533.                 BIOS code. This process can not be emulated so it will
  534.                 be aborted. The program can probably not be disinfected.
  535.  
  536.         Approached stack crash.
  537.  
  538.  
  539.  
  540.  
  541.                                      Page 8
  542.  
  543.  Thunderbyte clean utility. (C) Copyright 1989-1992 Thunderbyte B.V.
  544.  
  545.  
  546.                 The emulated program is approaching a crash. Something
  547.                 went wrong while emulating the program so it will be
  548.                 aborted. The program can probably not be disinfected.
  549.  
  550.         Attempt to violate license agreements.
  551.  
  552.                 TbClean will not disassemble this program for obvious
  553.                 reasons.
  554.  
  555.         Encountered keyboard input request.
  556.  
  557.                 The emulated program tries to read the keyboard. This
  558.                 is very unusual for viruses, so the file is probably
  559.                 not infected at all.
  560.  
  561.         Encountered an invalid instruction.
  562.  
  563.                 The emulator encountered an unknown instruction. For
  564.                 some reason the emulation failed. The program can
  565.                 probably not be disinfected.
  566.  
  567.         DOS program-terminate request.
  568.  
  569.                 The emulated program requests DOS to stop execution.
  570.                 The program is not infected at all, or infected by an
  571.                 overwriting virus that does not pass control to its
  572.                 host program. The program can not be disinfected.
  573.  
  574.         Jumped to original program entry point.
  575.  
  576.                 The program jumped back to the start position. It is
  577.                 very likely it is infected. The program can probably be
  578.                 disinfected.
  579.  
  580.         Undocumented DOS call with pointers to relocated code.
  581.  
  582.                 This is very common for viruses that add themselves in
  583.                 front of the COM type program. The program can probably
  584.                 be disinfected.
  585.  
  586.         Encountered an endless loop.
  587.  
  588.                 TbClean encountered a situation in which the program is
  589.                 executing the same instruction sequences over and over
  590.                 again for hundreds of thousands of times. It is
  591.                 unlikely that the program will ever escape from this
  592.                 loop, so the emulation will be aborted.
  593.  
  594.         Ctrl-break pressed.
  595.  
  596.                 The user pressed Control-break so the clean attempt is
  597.                 aborted.
  598.  
  599.  
  600.  
  601.                                      Page 9
  602.  
  603.  Thunderbyte clean utility. (C) Copyright 1989-1992 Thunderbyte B.V.
  604.  
  605.  
  606.         Emulation aborted for unknown reason.
  607.  
  608.                 This reason should never be specified. If this happens
  609.                 please send a copy of the file being emulated to
  610.                 Thunderbyte BV or one of the support BBSs.
  611.  
  612.     Sorry, the collected information is not sufficient to clean file...
  613.  
  614.         The heuristic cleaning mode of TbClean is aborted and has not
  615.         been successful. The only option left is to restore the file
  616.         from a backup or to re-install the program.
  617.  
  618.     Collected enough information to attempt a reliable clean
  619.     operation...
  620.  
  621.         The emulation of the virus provided TbClean with all
  622.         information necessary to disinfect the file.
  623.  
  624.     Some DOS error occured. Clean aborted!
  625.  
  626.         Some DOS error occured while trying to clean the file. Check
  627.         that no files are read-only or located on a write protected
  628.         disk, and make sure there is a reasonable amount of free disk
  629.         space.
  630.  
  631.     The clean attempt seems to be successful. Test the file
  632.     carefully!
  633.  
  634.         It seems that TbClean removed the virus from the file.  No
  635.         doubts about the virus: it is gone. However, take care and test
  636.         the file carefully to see if it works as expected.
  637.  
  638.  
  639.   2.5.  The result
  640.  
  641.     The result is called successful if the functionality of the
  642.     original program is restored, and the functionality of the virus
  643.     has been reduced to zero. Note that this does not imply that the
  644.     cleaned file is 100% equal to the original.
  645.  
  646.     When TbClean used heuristic cleaning to disinfect the program, the
  647.     file will most likely not be exactly the same as in its original
  648.     state. This is not an indication of failure of TbClean, nor does it
  649.     mean the file is still infected in some way. First of all, it is
  650.     normal that the heuristically cleaned file is still larger than the
  651.     original. This is normal because TbClean tries to be on the safe
  652.     side and it will avoid removing too much. The bytes left at the end
  653.     of the file are 'dead' code, the instructions will never be
  654.     executed again since the jump at the beginning of the program has
  655.     been removed. If the cleaned file is an EXE type file, it is likely
  656.     that some bytes in front of the program - the exeheader - are
  657.     different. There are many suitable solutions to reconstruct the
  658.  
  659.  
  660.  
  661.                                     Page 10
  662.  
  663.  Thunderbyte clean utility. (C) Copyright 1989-1992 Thunderbyte B.V.
  664.  
  665.  
  666.     exeheader, and TbClean can of course never know the original state
  667.     of the program. The functionality of the cleaned file will
  668.     nevertheless be the same!
  669.  
  670.     Note that this only applies to heuristic cleaning: if there is a
  671.     suitable Anti-Vir.Dat record available, the cleaned program will
  672.     normally be exactly the same as the original clean file.
  673.  
  674.     It is possible that the infected file is infected with multiple
  675.     viruses, or multiple instances of the same virus! Some viruses keep
  676.     on infecting files, and in such cases the infected files will keep
  677.     growing. If TbClean used its heuristic cleaning mode, it is very
  678.     likely that TbClean removed only one instance of the virus. In this
  679.     case, it is necessary to repeat the cleaning process until TbClean
  680.     reports that it can not remove anything anymore.
  681.  
  682.  
  683.   2.6.  Command line options
  684.  
  685.     It is possible to specify options on the command line.  TbClean
  686.     recognizes option short-keys and option words. The words are
  687.     easier to memorize, and they will be used in this manual for
  688.     convenience.
  689.  
  690.     optionword  parameter short  explanation
  691.     ----------  --------- ----- -------------------------------------
  692.  
  693.     help                    he  =help (-? = short help)
  694.     pause                   pa  =enable 'Pause' prompt
  695.     mono                    mo  =force monochrome
  696.     noav                    na  =do not use Anti-Vir.Dat record
  697.     noems                   ne  =do not use expanded memory
  698.     showloop                sl  =show every loop iteration
  699.     list [=<filename>]      li  =create list file
  700.  
  701.  
  702.    2.6.1.  help (he)
  703.  
  704.     If you specify this option TbClean displays the contents of the
  705.     TBCLEAN.HLP file if it is available in the home directory of
  706.     TbClean.  If you specify the '?' option you will get the summarized
  707.     help info as listed above.
  708.  
  709.    2.6.2.  pause (pa)
  710.  
  711.     When you enter option 'pause' TbClean will stop after producing one
  712.     screen with disassembly info.  This gives you the possibility to
  713.     examine the results.
  714.  
  715.     * This option is available for registered users only.
  716.  
  717.    2.6.3.  mono (mo)
  718.  
  719.  
  720.  
  721.                                     Page 11
  722.  
  723.  Thunderbyte clean utility. (C) Copyright 1989-1992 Thunderbyte B.V.
  724.  
  725.  
  726.     This option forces TbClean to refrain from using colors in the
  727.     screen output. This might enhance the screen output on some LCD
  728.     screens or color-emulating monochrome systems.
  729.  
  730.    2.6.4.  noav (na)
  731.  
  732.     This option causes TbClean to behave as it would if there were no
  733.     Anti-Vir.Dat record available.
  734.  
  735.    2.6.5.  noems (ne)
  736.  
  737.     If TbClean detects the presence of expanded memory it will use it
  738.     when heuristically cleaning programs. However, if your expanded
  739.     memory is very slow or your expanded memory manager is not very
  740.     stable, you can disable the use of expanded memory with option
  741.     'noems'.
  742.  
  743.    2.6.6.  showloop (sl)
  744.  
  745.     Normally TbClean keeps track of looping conditions, to keep a loop
  746.     that would be emulated thousands of times from being listed on your
  747.     screen over and over again. With this option TbClean 'works out'
  748.     every loop. Note that the speed of TbClean will be reduced
  749.     drastically and it can take literally hours to finish!. Do NOT
  750.     combine this option with option 'list' because the list file might
  751.     grow to megabytes of data!
  752.  
  753.    2.6.7.  list (li)
  754.  
  755.     If you specify this option TbClean will generate a list file which
  756.     contains a chronologic disassembly of the virus being removed. You
  757.     may optionally specifiy a filename. If you omit the filename, the
  758.     list file will get the name of the output file with the extension
  759.     '.LST'.
  760.  
  761.     * This option is available for registered users only.
  762.  
  763.  
  764.   2.7.  Cleaning multiple files
  765.  
  766.     TbClean has no provisions for cleaning multiple programs in
  767.     one run. There are two reasons for this omission:
  768.  
  769.     -   TbClean can not search for viruses automatically since it does
  770.         not know any virus.
  771.  
  772.     -   We highly recommend to clean the system on a file-by-file
  773.         approach. Clean one file, verify the result, and proceed with
  774.         the next file. This helps you to keep track of which file is
  775.         clean, which file is damaged and should be restored from a
  776.         backup, and which file is still infected.
  777.  
  778.  
  779.  
  780.  
  781.                                     Page 12
  782.  
  783.  Thunderbyte clean utility. (C) Copyright 1989-1992 Thunderbyte B.V.
  784.  
  785.  
  786.   2.8.  Examples:
  787.  
  788.         TbClean VIRUS.EXE
  789.  
  790.             TbClean will make a backup with the name VIRUS.VIR and it
  791.             will disinfect VIRUS.EXE
  792.  
  793.         TbClean VIRUS.EXE TEST.EXE
  794.  
  795.             TbClean will copy VIRUS.EXE to TEST.EXE and disinfect
  796.             TEST.EXE
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.                                     Page 13
  842.  
  843.  Thunderbyte clean utility. (C) Copyright 1989-1992 Thunderbyte B.V.
  844.  
  845.  
  846. 3.  CONSIDERATIONS AND RECOMMENDATIONS
  847.  
  848.  
  849.   3.1.  Why cleaning?
  850.  
  851.     Why should you try to disinfect a contaminated file? You should
  852.     have a recent backup of your system anyway, so why not just restore
  853.     the infected programs from the backup? You can also use the
  854.     original program distribution disks to install the clean program
  855.     again. A virus removal utility should not be your last resort!
  856.  
  857.     There is however one occasion in which cleaning can be recommended:
  858.  
  859.     You have a company or are responsible for it, and you want to
  860.     disturb business as little as possible. Note that when dealing with
  861.     viruses, the goal should not be removal of the virus at any price,
  862.     but to minimize the damage to the company as much as possible!
  863.     Restoring a backup of a large network can be very time consuming,
  864.     and can be very expensive if the normal operations in the company
  865.     are disturbed. In this case you have a valid reason to disinfect
  866.     all contaminated programs and delay a large restore operation until
  867.     night or weekend.
  868.  
  869.     Note that TbClean is not an excuse to stop making frequent backups
  870.     or to start using illegal software! If you don't have a recent
  871.     backup, make one NOW! If you use illegal software you are taking a
  872.     great risk and you will experience the results sooner or later.
  873.  
  874.  
  875.   3.2.  After cleaning.
  876.  
  877.     A successful use of TbClean is not the end of the story! Your job
  878.     is just partially completed.
  879.  
  880.     Some viruses damage data. They randomly change bytes on your disk,
  881.     swap sectors, or perform other nasty tricks. A cleaning utility
  882.     NEVER repairs your data! Check your data thoroughly and consult a
  883.     virus expert to get information about the virus. If there is any
  884.     doubt, you had better restore your data!
  885.  
  886.     UNDER NO CIRCUMSTANCES SHOULD YOU CONTINUE TO USE CLEANED SOFTWARE!
  887.  
  888.     Cleaning is a temporary solution to allow you to delay a large
  889.     restore operation until low-working hours. You should not rely on
  890.     a cleaned program forever. This has nothing to do with the
  891.     anti-virus product you have used to clean the software. If your
  892.     data is valuable to you, you should care for it as much as
  893.     possible, and using original software only is an elementary
  894.     precaution.
  895.  
  896.     Restore the original software as soon as possible!
  897.  
  898.  
  899.  
  900.  
  901.                                     Page 14
  902.  
  903.  Thunderbyte clean utility. (C) Copyright 1989-1992 Thunderbyte B.V.
  904.  
  905.  
  906.   3.3.  Cleaning limitations.
  907.  
  908.     Although TbClean has a very high success rate and is able to clean
  909.     programs that other cleaners refuse to process, not all viruses can
  910.     be removed, and not all files can be cleaned.
  911.  
  912.     Viruses that can not be removed from an infected file:
  913.  
  914.     -   Overwriting viruses.
  915.         Overwriting viruses are viruses that do not add themselves to
  916.         the end of the original program, they just copy themselves over
  917.         the original file. These viruses do not attempt to invoke the
  918.         original program anymore and just return to DOS after
  919.         invokation.  Normally these viruses hang the machine or put
  920.         you back to the DOS prompt. Since the original file is
  921.         overwritten and damaged, no cleaner can remove the virus.
  922.  
  923.     -   Some encrypted viruses.
  924.         TbClean is usually able to decrypt the virus. However, some
  925.         viruses use anti-debugger features that TbClean can not yet
  926.         deal with.
  927.  
  928.     Programs that can not be cleaned:
  929.  
  930.     -   EXE-programs with internal overlays.
  931.         Some EXE-programs have internal overlays. TbScan prints an 'i'
  932.         after the programs that have internal overlays. These programs
  933.         can not be infected without damaging them. Some viruses
  934.         recognize such programs and do not infect them, but most
  935.         viruses infect these programs anyway, resulting in a corrupted
  936.         program. No cleaner can cure such damage.
  937.  
  938.     -   Programs with sanity check routines.
  939.         Some programs - mostly anti-virus software or copy-protected
  940.         programs - perform some kind of sanity check. Heuristic
  941.         cleaning of an infected program normally results in a program
  942.         that is not physically identical to the original. Although the
  943.         virus is removed from the program and the program is
  944.         functionally identical to the original, the sanity check will
  945.         usually detect the few bytes that are still added to the
  946.         program or the stack that has been changed slightly.
  947.  
  948.  
  949.   3.4.  Safety of TbClean
  950.  
  951.     Some people will notice that a good emulation is identical to an
  952.     execution and has the same effect. Since the heuristic cleaning
  953.     mode will emulate, disassemble and eventually execute the virus it
  954.     is wise to consider the dangers of using TbClean. What have we done
  955.     to get a reliable and safe emulation and to avoid all potential
  956.     dangers?
  957.  
  958.  
  959.  
  960.  
  961.                                     Page 15
  962.  
  963.  Thunderbyte clean utility. (C) Copyright 1989-1992 Thunderbyte B.V.
  964.  
  965.  
  966.     Although the virus is allowed to execute some instructions in a
  967.     strictly controlled environment, a lot of instructions that have a
  968.     dangerous potential are NEVER allowed to execute. Among these
  969.     instructions are all DOS and BIOS system calls, instructions to
  970.     send data to IO-ports, instructions to change non-owned memory
  971.     - such as DOS or interrupt tables - are never executed but instead
  972.     emulated.  Jumps to DOS or BIOS or other non-owned memory are
  973.     prohibited. Although for the virus it may seem to be a normal
  974.     DOS environment, it isn't at all. As an extra safety bonus, before
  975.     termination of TbClean all memory accessed to store data will be
  976.     wiped or restored to its original state.
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.                                     Page 16